<?php if(isset($_SESSION['user']['user_id']) && $_SESSION['user']['user_id']!=""){?>
<script>
	function validate(){
		$("#signupForm").attr( "action", "admin-profile" );	
		$("#signupForm").submit();
	}

</script>
<div class="col-md-8">
<div class="main-content" id="main-content">
	<div class="sub-content">
			<div class="top-header page-header clearfix">
				<h1>Admin Profile</h1>
			</div>
			<div class="top-links">
				<ul class="form-progress-bar">					
					<li class="active-menu step-no"><a href="<? echo $this->Url('profiles')?>/admin-profile"><span>1</span></a></li>
					<li class="indicator active-menu"><span></span></li>
					<li class="step-no active-menu"><a  href="<? echo $this->Url('profiles')?>/admin-profile-next"><span>2</span></a></li>
					<li class="indicator active-menu"><span></span></li>
					<li class="active-menu step-no"><a  href="<? echo $this->Url('profiles')?>/admin-profile-confirm"><span>3</span></a></li>									
				</ul>
			</div>
		<div class="user-profile1 col-md-12">
				<form id="signupForm" name="signupForm"  method="post" class="form-horizontal"> 
											
						<div class="form-group">
							<label class="control-label col-sm-3">Company Name</label>
							<div class="col-sm-9">
							<?if( isset($this->user_details->company_name) ){?>
								<input  type="text" id="cname" name="cname"  class="form-control" readonly="readonly" value="<? echo $this->user_details->company_name;?>" placeholder="Company Name"> 
							<?}?></div>
						</div>
						<div class="form-group" id="currFormsList1">
							<label class="control-label col-sm-3">Industries</label>
							<div id="industries"  class="col-sm-9">
							</div>
						</div>
						<div class="form-group">
							<label class="control-label col-sm-3">Address 1</label>
							<div class="col-sm-9">
							<?if( isset($this->user_details->address1) ){?>
								<textarea  class="profile_add form-control" id="address1" readonly="readonly" name="address1" ><? echo $this->user_details->address1;?></textarea>
							<?}?></div>
						</div>
						<div class="form-group">
							<label class="control-label col-sm-3">Address 2</label>							
							<div class="col-sm-9">
							<?if( isset($this->user_details->address2) ){?>
								<textarea class="profile_add form-control" id="address2" name="address2" readonly="readonly" ><? echo $this->user_details->address2;?></textarea>
							<?}?></div>
						</div>
						<div class="form-group ">
							<label class="control-label col-sm-3">Address 3</label>
							<div class="col-sm-9">
							<?if( isset($this->user_details->address3) ){?>
								<textarea  class="profile_add form-control" id="address3" name="address3"  readonly="readonly" ><? echo $this->user_details->address3;?></textarea>
							<?}?></div>
						</div>
						<div class="form-group">
							<label class="control-label col-sm-3">Landmark Near By</label>
							<div class="col-sm-9">
							<?if( isset($this->user_details->landmarknearby) ){?>
								<input type="text" id="lmnear" name="lmnear"  class="form-control" readonly="readonly"  value="<? echo $this->user_details->landmarknearby;?>" placeholder="Landmark Near By" />
							<?}?></div>
						</div>
						<div class="form-group">
							<label class="control-label col-sm-3">City</label>							
							<div class="col-sm-9">
							<?if( isset($this->user_details->city) ){?>
								<input  type="text" id="city"  readonly="readonly" class="form-control" value="<? echo $this->user_details->city;?>" name="city" placeholder="Please enter city"/>
							<?}?></div>
						</div>
						<div class="form-group" id="currFormsList1">
							<label class="control-label col-sm-3">Countries</label>
							<div id="countries" class="col-sm-9">
							</div>
						</div>
						<div class="form-group">
							<label class="control-label col-sm-3">Email</label>
							<div class="col-sm-9">
							<?if( isset($this->user_details->email) ){?>
								<input  type="text" id="email" name="email" class="form-control" readonly="readonly" value="<? echo $this->user_details->email;?>" placeholder="Email" />
							<?}?></div>
						</div> 
						<div class="form-group">
							<label class="control-label col-sm-3">Phone </label>
							<div class="col-sm-9">
							<?if( isset($this->user_details->phone) ){?>
								<input  type="text" id="phone" name="phone" class="form-control" readonly="readonly" value="<? echo $this->user_details->phone;?>" placeholder="Phone" />
							<?}?></div>
						</div>
						<div class="form-group">
							<label class="control-label col-sm-3">Fax </label>
							<div class="col-sm-9">
							<?if( isset($this->user_details->fax) ){?>
								<input  type="text" id="fax" name="fax" class="form-control"  readonly="readonly" placeholder="Fax" value="<? echo $this->user_details->fax;?>" />
							<?}?></div>
						</div>

					<div class="form-group">
						<label class="control-label col-sm-3">Contact Person 1</label>
							<div class="col-sm-9">
							<?if( isset($this->user_details->contact_person) ){?>
								<input  type="text" id="cperson" name="cperson" class="form-control" readonly="readonly"  value="<? echo $this->user_details->contact_person;?>" placeholder="Contact Person 1"> 
							<?}?></div>
					</div>
					<div class="form-group">
						<label class="control-label col-sm-3">Mobile No</label>
							<div class="col-sm-9">
							<?if( isset($this->user_details->mobile) ){?>
								<input  type="text" id="mobile" name="mobile" class="form-control" readonly="readonly"  value="<? echo $this->user_details->mobile;?>" placeholder="Mobile No">
							<?}?></div>
					</div>
					<div class="form-group">
						<label class="control-label col-sm-3">Email Address</label>
							<div class="col-sm-9">
							<?if( isset($this->user_details->second_email) ){?>
								<input  type="text" id="email" name="email" class="form-control" readonly="readonly"  value="<? echo $this->user_details->second_email;?>" placeholder="Email"> 
							<?}?></div>
					</div>
				    <div class="form-group">
						<label class="control-label col-sm-3">Bank Address</label>
							<div class="col-sm-9">
							<?if( isset($this->user_details->bankaddress) ){?>
								<input  type="text" id="baddress" name="baddress" class="form-control" readonly="readonly"  value="<? echo $this->user_details->bankaddress;?>" placeholder="Bank Address"> 
							<?}?></div>
					</div>
					<div class="form-group">
						<label class="control-label col-sm-3">Account No</label>
							<div class="col-sm-9">
							<?if( isset($this->user_details->account_number) ){?>
								<input  type="text" id="acno" name="acno" class="form-control" readonly="readonly"  value="<? echo $this->user_details->account_number;?>" placeholder="Account No"> 
							<?}?></div>
					</div>
					<div class="form-group">
						<label class="control-label col-sm-3">Note</label>
							<div class="col-sm-9">
							<?if( isset($this->user_details->note) ){?>
								<input  type="text" id="note" name="note" class="form-control" readonly="readonly"  value="<? echo $this->user_details->note;?>" placeholder="Note">
							<?}?></div>
					</div>
					<div class="form-group">
						<label class="control-label col-sm-3">User Type</label>
							<div class="col-sm-9">
							<?if( isset($this->user_details->user_type) ){?>
								<input  type="text" id="type" name="type" class="form-control" readonly="readonly"  value="<? echo $this->user_details->user_type;?>" placeholder="User Type">
							<?}?></div>
					</div>
					<div class="form-group">
								<label class="control-label col-sm-3">Status</label>
							<div class="col-sm-9">
							<?if( isset($this->user_details->u_status) ){
							if( $this->user_details->u_status == '0' ){
								$statusMsg = "Pending";
							}
							else if( $this->user_details->u_status == '1' ){
								$statusMsg = "Activate";
							}
							else if( $this->user_details->u_status == '2' ){
									$statusMsg = "DeActive";
								}?>
									<input  type="text" id="status" name="status" class="form-control" readonly="readonly"  value="<? echo $statusMsg;?>" placeholder="status">
							<?}?></div>
								
					</div>

						<input type="hidden" id="indsCntrysIds" name="indsCntrysIds" value="<? if(isset($_SESSION['usersinfo']['indsCntrysIds'])){ echo $_SESSION['usersinfo']['indsCntrysIds']; } else{ echo "";} ?><? if(isset( $this->loadedCombinations )){ echo $this->loadedCombinations; } else{ echo "";} ?>" />
						<input type="hidden" id="indsCntrysCount" name="indsCntrysCount" value="<? if(isset($_SESSION['usersinfo']['indsCntrysCount'])){ echo $_SESSION['usersinfo']['indsCntrysCount']; } else{ echo "";} ?><? if(isset( $this->existingCombsCount )){ echo $this->existingCombsCount; } else{ echo "";} ?>" />
						<input type="hidden" id="hid_user_id" name="hid_user_id" value=""/>					
						<input type="hidden" id="edit_status" name="edit_status" value="">
						
							<div class="form-group">
									<label class="col-sm-3">&nbsp;</label>
								   <a href="javascript:void(0)"  id="continue" onclick="validate();" class="btn btn-danger" role="button">Submit</a>							 
									<div id="loading" style="display:none;float:right;margin-right:30px;"><img src="" /></div>
								
							</div>
						
					
				</form>
		</div>
	</div>
</div></div>
<script type="text/javascript">

$( document ).ready(function()
{

	var indsCntrysCount = $("#indsCntrysCount").val().trim();
	var indsCntrysIds = $("#indsCntrysIds").val();
	
	// alert( indsCntrysCount );
	// alert( indsCntrysIds );
	
	var indsDivsHtml = "";
	var ctrsDivsHtml = "";

	var indsCntrysInfoRows = indsCntrysIds.split( "!" );

	for( var indsCntrysRowId = 0; indsCntrysRowId < indsCntrysCount; indsCntrysRowId++ )
	{
		var currIndCntrysRow = indsCntrysInfoRows[indsCntrysRowId].split( "#" );
		
		var currIndsInfo = currIndCntrysRow[0].split( "/" );
		var currCtrsInfo = currIndCntrysRow[1].split( "-" );
		
		indsDivsHtml += currIndsInfo[1] + ",";
		ctrsDivsHtml += currCtrsInfo[1] + ",";
	}
	indsDivsHtml = indsDivsHtml.substring(0, (indsDivsHtml.length-1));
	ctrsDivsHtml = ctrsDivsHtml.substring(0, (ctrsDivsHtml.length-1));
	
	$("#industries").html( indsDivsHtml );
	$("#countries").html( ctrsDivsHtml );

});



</script>
<?php }else{?>
<script>
	window.location='<? echo $this->Url('home')?>';
</script>
<?php }?>

	

